package com.design.create.prototype;

/**
 * 浅拷贝角色----创建原型对象
 */
public class ShallowClonePrototype extends Prototype{

    @Override
    public Prototype clone() {
        Prototype prototype = null;
        try {
            prototype = (Prototype) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
        return prototype;
    }

    @Override
    public void show() {
        System.out.println("浅拷贝实现");
    }
}
